<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo $view->contest['name']; ?></title>
        <style type="text/css">
            body {
                margin:0px;
                padding:0px;
                font-family:Arial, Helvetica, sans-serif;
                font-size:12px;
                color:#000;
            }
            p {
                line-height:16px;
                margin:0px;
                padding:0px;
            }

            h1 {
                padding:0px;
                margin-bottom:5px;
                margin-top:0px;
                font-size:14px;
            }
            a {
                color:#FFFFFF;
                text-decoration:none;
            }
            a:hover {
                color:#000;
                text-decoration:underline;
            }

            img{ border:0px; background:none;}
            img a{ border:0px; background:none;}
            .w760{ width:760px;}
            .w720{ width:720px;}
            .mc{ margin:0 auto;}
            .top_bg{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/top_bg.png) top left no-repeat;}
            .bot_bg{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bot_bg.png) bottom left no-repeat; padding-bottom:40px;}
            .mid_bg{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/mid_bg.png) top left repeat-y;}
            .bg_img{ border:6px solid #000000; width:708px;}
            .bg_img img{ text-align:center; width:708px; height:300px; overflow:hidden;}
            .bg_img_small{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_img.png) top left no-repeat; width:159px; height:143px; margin-left:16px; float:left; position:relative; margin-bottom:30px; text-align:center; padding-top:4px;}
            .bg_img_small .img1{ width:151px; height:98px; overflow:hidden;}
            .bg_content{ background:#2b2b2b; border: 3px solid #000; width:714px;}
            ul.menu{ list-style:none; margin-left:0px; padding-left:0px; padding-top:20px; padding-left:20px;}
            ul.menu li{ margin-right:3px; float:left; width:167px;}
            ul.menu li a{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_menu.png) top left no-repeat; display:block; text-align:center; padding:12px 0px 12px 0px; font-size:14px; font-weight:bold; color:#fff;}
            ul.menu li a:hover{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_menu_over.png) top left no-repeat; text-decoration:none; color:#000000;}
            ul.menu li a.curr1{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_menu_over.png) top left no-repeat; text-decoration:none; color:#000000;}
            .p20t{ padding-top:20px;}
            .black_bg1{ text-align:center; padding:3px 5px 3px 5px; background:url(<?php echo $view->config['template_url'];?>assets/img/760/black_bg.png) repeat; color:#fff; font-size:10px; position:absolute; bottom:45px; left:3px; width:142px;}
            .black_bg2{ text-align:center; padding:5px 5px 5px 5px; background:url(<?php echo $view->config['template_url'];?>assets/img/760/black_bg.png) repeat; color:#fff; font-size:15px; position:absolute; top:3px; right:3px;}
            ul.pagin{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_page.png) top left no-repeat; width:130px; height:24px; margin-left:0px; padding-left:13px; padding-top:7px; float:right;}
            ul.pagin li{ margin-right:2px; width:20px; text-align:center; float:left; padding-left:0px; margin-left:0px;}
            ul.pagin li a{font-size:12px; font-weight:bold; color:#FFFFFF; text-decoration:none; width:20px;}
            ul.pagin li a:hover{color:#fdc029;}
            ul.pagin li a.curr2{color:#fdc029;}
            .bg_social{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_social.png) top left no-repeat; width:245px; height:49px; float:left; padding:13px 0px 0px 15px;}
            .po{ position:relative;}
            .bg_overlay{ background:url(<?php echo $view->config['template_url'];?>assets/img/760/bg_overlay.png) top left repeat; width:690px; padding:10px 10px 10px 10px; position:absolute; bottom:0px; left:0px; color:#fdc029; font-size:16px;}
            
            .lightbox-normal-text-size{
                font-size: 11px;
            }
            .bg_img_lightbox{
                background: url("images/bg_small_img.png") no-repeat scroll left top transparent;
                height: 65px;
                padding-top: 3px;
                text-align: center;
                width: 65px;
            }
        </style>
        <script type="text/javascript" src="../libs/js/jquery.min.js"></script>
        <script type="text/javascript" src="../libs/js/jquery.blockUI.js"></script>
        <script type="text/javascript">
            jQuery.noConflict();
        </script>        

        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/contest.js"></script>   

        <link type="text/css" rel="stylesheet" href="../libs/lightface/Assets/LightFace.css" />
        
        <link type="text/css" rel="stylesheet" href="<?php echo $view->config['template_url'];?>assets/css/style.css" />
        
        <script type="text/javascript" src="../libs/js/mootools-1.3.js"></script>

        <script type="text/javascript" src="../libs/lightface/tests/mootools-more-drag.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Request.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Static.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.IFrame.js"></script>
        <script type="text/javascript" src="../libs/lightface/Source/LightFace.Image.js"></script>

        <!-- start loading private library -->
        <script type="text/javascript" src="<?php echo $view->config['template_url'];?>assets/js/facebooktab.js"></script>
        
        <!-- for friend selectors -->  
        <link rel="stylesheet" href="../libs/js/fbfriendselector/jquery.facebook.multifriend.select.css" /> 
    </head>
    <body>
        <script src="http://connect.facebook.net/en_US/all.js"></script>
        <div id="fb-root"></div>
        <script type="text/javascript" charset="utf-8">            
            FB.init({
                appId  : '<?php echo $view->config['facebook_app_id']; ?>',
                status : true, // check login status
                cookie : true, // enable cookies to allow the server to access the session
                xfbml  : true, // parse XFBML               
                oauth  : true // enable OAuth 2.0
            });         
        </script>
        
        <!-- set up the javascript variables --> 
        
        <script type="text/javascript">
            <?php if ($view->isConnectedFacebook) { ?>
                                contestapp.isConnectedFacebook = true;
            <?php } ?>
            // set up for lightbox
            facebooktab.lightboxPaddingTop = 180;
            facebooktab.lightboxAutoAdjust = false;
            contestapp.tostitle = "<?php echo $view->contest['tos_link_text']; ?>";            
            contestapp.isEndOfContest = "<?php echo $view->isEndOfContest; ?>";
            
        </script>
        <div class="w760 mc">
            <table width="760" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <div class="mid_bg">
                            <div class="top_bg">
                                <div class="bot_bg">          
                                    
                                    <ul class="menu">

                                        <?php if($view->contest['show_contribution_tab'] == "on") { ?>
                                        <li><a href="?action=vote" <?php if($view->action == "vote"){?>class="curr1"<?php } ?>><?php echo $view->contest['contribution_tab_label']; ?></a></li>                                
                                        <?php } ?>
                                        
                                        <?php if($view->contest['show_signup_tab'] == "on" && !$view->isEndOfContest) { ?>
                                        <li><a href="?action=index" <?php if($view->action == "index"){?>class="curr1"<?php } ?>><?php echo $view->contest['signup_tab_lable']; ?></a></li>                                
                                        <?php } ?>
                                            
                                        <?php if($view->contest['show_about_tab'] == "on") { ?>
                                        <li><a href="?action=about" <?php if($view->action == "about"){?>class="curr1"<?php } ?>><?php echo $view->contest['tab_lable']; ?></a></li>                                
                                        <?php } ?>
                                        
                                        <?php if($view->contest['show_external_tab'] == "on") { ?>
                                        <li><a target="_blank" href="<?php echo $view->contest['external_tab_url'];?>"><?php echo $view->contest['external_tab_text']; ?></a></li>
                                        <?php } ?>
                                    </ul>   
                                    
                                    <div style="clear:left"></div>
                                    
                                    <?php if($view->action != "index" && $view->action != "noactivecontest") { ?>
                                    <div class="w720 mc p20t">
                                        <div class="bg_img po">
                                            <div class="bg_overlay">
                                                <p><?php echo $view->contest['overlay_text']; ?></p>
                                            </div>
                                            <img style="width:708px;height: auto;" src="<?php echo $view->contest['banner_overlay_image'];?>" alt="" /></div>
                                    </div>
                                    <?php } ?>
                                    
                                    <div class="w720 mc p20t">
                                        <div class="bg_content p20t mc">
                                            <!-- main content here -->
                                            <?php echo $view->view_content; ?>
                                        </div>
                                    </div>
                                    
                                    <?php if($view->action == "index" && $view->action != "noactivecontest") { ?>
                                    <div class="w720 mc">
                                        <div class="bg_img po">
                                            <div class="bg_overlay">
                                                <p><?php echo $view->contest['overlay_text']; ?></p>
                                            </div>
                                            <img style="width:708px;height: auto;" src="<?php echo $view->contest['banner_overlay_image'];?>" alt="" /></div>
                                    </div>
                                    <?php } ?>
                                    
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
            <div style="float:right;padding: 10px;margin-top: -5px;font-size: 8pt;color:black;"><a style="color:#000;" href="javascript:contestapp.showTOSWindow();"><?php echo $view->contest['tos_link_text'];?></a></div>
        </div>
        
        <script type="text/javascript" src="http://apis.google.com/js/plusone.js">
            {lang: 'no'}
        </script>    
        <script type="text/javascript" charset="utf-8">
            FB.Canvas.setSize({ width: 810, height: 1800 });
        </script>
        <script type="text/javascript">  
            
            document.id(document.body).addEvent('click',facebooktab.likecloser);        
            
        </script>
        <br/>
    </body>
</html>